<template>
    <div-row :obj="obj" class="weather">
        <div class="weather-box">
            我是天气预报
            <div class="city">
                <i class="iconfont icon-editor"></i>
                <span></span>
            </div>
        </div>
    </div-row>
</template>
<script>
import { getWeather,getNewsByState } from '@/api/api'
export default {
    title: 'News',
    props: {
        obj: {
            type: Object
        }
    },
    data() {
        return {
            cityId: '284828',
            city: {},
            weather: {}
        }
    },
    created() {
        this._getWeather();
    },
    methods: {
        _getWeather() {
            getWeather(this.cityId)
                .then((response) => {
                    if (response.code == 0) {
                        const res = response.data;
                        this.loading = false;
                        this.city = res.city;
                        this.weather = res.condition
                    }
                })
        }
    }
}
</script>
<style lang="scss" scoped>
    .weather{

    }
</style>
